package org.hrqing.authorization.repo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hrqing.authorization.entity.Consent;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

/**
 * @auther Hrqing
 */
public interface ConsentRepo extends JpaRepository<Consent, String> {
    Optional<Consent> findByRegisteredClientIdAndPrincipalName(String registeredClientId, String principalName);
    void deleteByRegisteredClientIdAndPrincipalName(String registeredClientId, String principalName);
}